export function  validateStyle(target:Element,value:string,hasValue:string):boolean {
    let getValue = getComputedStyle(target).getPropertyValue(value)
    console.log(getValue)
    return getValue === hasValue
}
// 移除选中样式
export function eachRemoveClass(target: HTMLElement | HTMLCollection, className: string) {
    if (target instanceof HTMLCollection) {
      Array.from(target).forEach((item) => {
        if (item.classList.contains(className)) {
          item.classList.remove(className)
        }
        if (item.children instanceof HTMLCollection && item.children.length > 0) {
          eachRemoveClass(item.children, className)
        }
      })
    } else {
      if (target.classList.contains(className)) {
        target.classList.remove(className)
      }
      if (target.children instanceof HTMLCollection && target.children.length > 0) {
        eachRemoveClass(target.children, className)
      }
    }
  }